import request from '@/utils/request'

// 查询商机列表
export function listCrmoppo(query) {
  return request({
    url: '/system/crmoppo/list',
    method: 'get',
    params: query
  })
}

export function listCrmoppobyid(query) {
  return request({
    url: '/system/crmoppo/listbyid',
    method: 'get',
    params: query
  })
}

export function listCrmoppoother(query) {
  return request({
    url: '/system/crmoppo/listother',
    method: 'get',
    params: query
  })
}

// 查询商机详细
export function getCrmoppo(oppoId) {
  return request({
    url: '/system/crmoppo/' + oppoId,
    method: 'get'
  })
}

// 新增商机
export function addCrmoppo(data) {
  return request({
    url: '/system/crmoppo',
    method: 'post',
    data: data
  })
}

// 修改商机
export function updateCrmoppo(data) {
  return request({
    url: '/system/crmoppo',
    method: 'put',
    data: data
  })
}

// 删除商机
export function delCrmoppo(oppoId) {
  return request({
    url: '/system/crmoppo/' + oppoId,
    method: 'delete'
  })
}
